package test.day02;

import java.util.Scanner;

public class Arraytest3 {
    public static void main(String[] args) {

        int r = (int) (Math.random() * 100 + 1);

        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();

        int max = 100;
        int min = 1;

        while (n != r){
            if(n > r){
                max = n;
                System.out.println("猜大了："+min+"~"+max);
            }else {
                min = n;
                System.out.println("猜小了："+min+"~"+max);
            }
            n = scan.nextInt();
        }
        System.out.println("猜对了");

    }

}
